import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import stores from '@/stores'

// 引入Element-plus及样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 重置样式
import 'normalize.css'
import '@/styles/index.scss'

import '@/router/permission'

// 中英文切换
import i18n from '@/locales'

const app = createApp(App)

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 自定义过渡动画
import '@/styles/css/transition.css'

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router)
app.use(ElementPlus)
app.use(stores)
app.use(i18n)

app.mount('#app')
